#pragma once

#define ENUM_DETAIL(e, v, s) ENUM_FORMAT(e, v, s)
#define ENUM_FORMAT_1(e, v, s) e = v,
#define ENUM_FORMAT_2(e, v, s) case e: return s;

#define ENUM_BEG enum {
#define ENUM_END };
#define ENUM_STR_BEG(func) const char* func(size_t e) { switch (e) {
#define ENUM_STR_END default: break; } return "Unknown"; }

